package com.icinfo.cloud.provider.punish.service;

import com.icinfo.cloud.provider.common.page.PageResponse;
import com.icinfo.cloud.provider.punish.approval.dto.*;
import com.icinfo.cloud.provider.punish.approval.vo.*;
import com.icinfo.cloud.provider.punish.ucase.casemain.dto.CaseIllegalParkingRecordDto;
import com.icinfo.cloud.provider.punish.ucase.casemain.dto.CaseIllegalParkingRecordRequest;
import com.icinfo.cloud.provider.punish.ucase.casemain.vo.CaseBasicInfoVo;
import com.icinfo.cloud.provider.punish.ucase.casemain.vo.CaseIllegalParkingRecordVo;
import com.icinfo.cloud.provider.punish.vo.CaseInfoVo;
import com.icinfo.framework.common.web.Result;

import java.text.ParseException;
import java.util.List;
import java.util.Map;

/**
 * 审批相关 服务
 * @author Administrator
 */
public interface ApprovalService {

    /**
     * 审批详情文书信息
     * @param dto
     * @return
     */
    Result<AuditInfoVo> getAuditDocDetail(AuditDetailDocumentQueryDto dto);

    /**
     * 查询待审批表
     * @param auditQueryPageDto
     * @return
     */
    Result<PageResponse<AuditInfoListVo>> getWaitAuditList(AuditQueryPageDto auditQueryPageDto);


    /**
     * 审核同意操作
     * @param approvalAuditDto
     * @return
     */
    Result doAgreeAudit(ApprovalAgreeAuditDto approvalAuditDto);

    /**
     * 审核退回操作
     * @param approvalAuditDto
     * @return
     */
    Result doReturnAudit(ApprovalReturnlAuditDto approvalAuditDto);


    /**
     * 查询审批链日志
     * @param auditDetailDocumentQueryDto
     * @return
     * @throws ParseException
     */
    Result<List<AuditInfoChainLogVo>> getAuditChain(AuditDetailDocumentQueryDto auditDetailDocumentQueryDto);

    /**
     * 查询日志链头部信息
     * @param auditDetailDocumentQueryDto
     * @return
     */
    Result<AuditInfoChainLogTopVo> getAuditChainTop(AuditDetailDocumentQueryDto auditDetailDocumentQueryDto);

    /**
     * 【V1.0.0】描述：公用-根据案件id查询案件简要基础信息
     *
     * @param caseId 案件id
     * @return {@link CaseBasicInfoVo} 案件简要基础信息
     * @author xiangyuyu
     * @date 2022-02-23 10:47
     */
    Result<CaseBasicInfoVo> getCaseBasicInfo(String caseId);

    /**
     * 已审批数据列表
     * @param auditQueryPageDto
     * @return
     */
    Result<PageResponse<AuditInfoListVo>> getOffAuditList( AuditQueryPageDto auditQueryPageDto);


    /**
     * 获取下一环节审批人
     * @param dto
     * @return
     */
    Result<List<NextAuditUserVo>> getNextNodeUser(AuditNextUserQueryDto dto);

    /**
     * 获取案件基础信息--案件详情
     * @param caseId
     * @author lxj
     * @return CaseInfoVo
     */
    CaseInfoVo getCaseInfo(String caseId);
    /**
     * 获取审批相关状态
     * @author liyafeng
     * @date 2022/8/9
      * @param
     * @return {@link Result}
     */
    Result getApprovalInfo(ApprovalQueryDto approvalQueryDto);
    /**
     * 提交审批
     * @author liyafeng
     * @date 2022/12/13
      * @param dto
     * @return {@link Map< String, Object>}
     */
    Result documentGeneralSubmit(ApprovalGeneralSubmitDto dto);
     /**
      * 提交自动审批
      * @author liyafeng
      * @date 2022/12/14
       * @param dto
      * @return {@link Result}
      */
    Result documentGeneralSubmitAuto(ApprovalGeneralSubmitDto dto);
    /**
     *速结程序查询当前审批信息
     * @author liyafeng
     * @date 2022/12/14
      * @param dto
     * @return {@link Result< FastCaseApprovalInfoVo>}
     */
    Result<FastCaseApprovalInfoVo> getFastCaseApprovalInfo(FastCaseApprovalDto dto);


    /**
     * 获取机动车违停记录列表
     * @param request
     * @return
     */
    Result<PageResponse<CaseIllegalParkingRecordVo>> getIllegalParkingList(CaseIllegalParkingRecordRequest request);

    /**
     * 新增机动车违停记录
     * @param dto
     * @return
     */
    Result saveIllegalParkingRecord(CaseIllegalParkingRecordDto dto);

    /**
     * 修改机动车违停记录
     * @param dto
     * @return
     */
    Result updateIllegalParkingRecord(CaseIllegalParkingRecordDto dto);

    /**
     * 删除机动车违停记录
     * @param dto
     * @return
     */
    Result deleteIllegalParkingRecord(CaseIllegalParkingRecordDto dto);

    /**
     * 获取机动车违停记录详情
     * @param dto
     * @return
     */
    Result<CaseIllegalParkingRecordVo> getIllegalParkingRecordDetail(CaseIllegalParkingRecordDto dto);
    /**
     * 速结程序查询是否审批完成
     * @author liyafeng
     * @date 2023/1/3
      * @param dto
     * @return {@link Result< FastCaseApprovalInfoVo>}
     */
    Result<String> getFastCaseIsApprovalPass(FastCaseApprovalDto dto);
    /**
     * 合并提交审批接口，该文书需要审批调用（简案快办合并提交使用）
     * @author liyafeng
     * @date 2023/5/10
      * @param dto
     * @return {@link Result}
     */
    Result documentGeneralMergeSubmit(ApprovalGeneralSubmitDto dto);
    /**
     * 审批通过（合并审批）
     * @author liyafeng
     * @date 2023/5/10
      * @param approvalAuditDto
     * @return {@link Result}
     */
    Result doAgreeAuditMerge(ApprovalAgreeAuditDto approvalAuditDto);
    /**
     * 审批退回(合并审批)
     * @author liyafeng
     * @date 2023/5/10
      * @param approvalAuditDto
     * @return {@link Result}
     */
    Result doReturnAuditMerge(ApprovalReturnlAuditDto approvalAuditDto);

    /**
     * 查询审批对象
     *
     * @param dto
     * @return
     */
    Result getApprovalOpinionHis(ApprovalOpinionHisQueryDto dto);
}
